import {BASEURL} from '@/services/api'
import {request, METHOD} from '@/utils/request'
import axios from "_axios@0.19.2@axios";

//获取用户信息
export async function getUserById(id){
    return request(BASEURL+'/user/getById/'+id,METHOD.GET,{
        id:id
    })
}
export async function uploadAvatar(file){
    return request(BASEURL+'/user/uploadAvatar',METHOD.POST,{
        file:file
    })
}

/*
* 上传图片
* */
export async function upload(file){
    return axios({
        headers: { 'Content-Type': 'multipart/form-data' },
        url: BASEURL+'/user/uploadAvatar',
        method:'post',
        data: file
    })
}
